<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>

  </style>
</head>

<body>
  <!-- v-for = "数组/对象/数字" : 基于数据循环，多次渲染整个元素： 记得添加 :key 属性 =”唯一值“-->
  <!-- v-for = "(item,index) in 数组" : 遍历数组 ，渲染元素 -->
  <div id="app">
    <ul>
      <li v-for="(item,index) in list" :key="item.id">{{item+':'+index}}</li>
    </ul>
  </div>

  <script src="../vue/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        list: ['抽烟', '喝酒', '烫头']
      },
      methods: {

      }
    })
  </script>
</body>

</html>